using System;
using Deepcode.Flux.Core.Extensions;
using Deepcode.Flux.Core.Extensions.Codons;

namespace Deepcode.Flux.Core.Codons.Asset
{
	/// <summary>
	/// Codon representing a file mask filter that can be used in the asset manager
	/// <AssetFilter	id="filtAllFiles"
	///					text="All files (*.*)"
	///					mask="*.*"/>	
	/// </summary>
	[XmlCodonName("AssetFilter")]
	public class AssetFilter : AbstractCodon
	{
		[XmlCodonAttribute("text")]
		private string text = "";
		[XmlCodonAttribute("mask")]
		private string mask = "";

		public override object BuildItem(object owner, System.Collections.ArrayList subItems)
		{
			return new Deepcode.Flux.Core.Systems.Asset.AssetFilter( text, mask );
		}
	}
}
